11. Quiz: Changing the Loop (4-4)

Directions:

Rewrite the following while loop as a for loop:

var x = 9;
while (x >= 1) {
  console.log("hello " + x);
  x = x - 1;
}

Your Code:

Start Quiz:

/*
 * Programming Quiz: Changing the Loop (4-4)
 */

// rewrite the while loop as a for loop
var x = 9;
while (x >= 1) {
    console.log("hello " + x);
    x = x - 1;
}

INSTRUCTOR NOTE:

Have questions? Head to Knowledge for discussion with the Udacity Community.